package com.x.chalk.controller;


import com.x.chalk.config.SystemConfig;
import com.x.chalk.service.intf.UserMsgService;
import com.x.chalk.vo.R;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description:
 * @Author: 邢朋辉
 * @Date: 2022/09/22 13:09:50
 */
@RestController
@RequestMapping("/api/msg/")
@CrossOrigin
@Api(tags = "消息相关操作")
public class UserMsgController {
    @Autowired
    private UserMsgService service;

    /**查询*/
    @GetMapping("all.do")
    public R all(HttpServletRequest request){
        return service.all(request.getHeader(SystemConfig.HEADER_TOKEN));
    }

}